<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /*  */
        @keyframes myscale {
            0% {
                transform: rotate(45deg) scale(1);
            }

            50% {
                transform: rotate(45deg) scale(0.5);
                opacity: 0.5;
            }

            100% {
                transform: rotate(45deg) scale(1);
            }
        }

        @keyframes myjian {
            0% {
                opacity: 1;
            }

            50% {
                transform: scale(0.5);
                opacity: 0.5;
            }

            10% {
                opacity: 1;
            }
        }

        /* 页面内初始化,清除所有标签内外边距 */
        * {
            margin: 0;
            padding: 0;
        }

        div {
            width: 200px;
            height: 200px;
        }

        /* 子绝父相,子类绝对定位 */
        .fu {
            margin: 200px auto;
            background-color: red;
            position: relative;
            left: 0;
            top: 0;
            transform: rotate(45deg);
            animation: myscale 2s infinite;
        }

        .zuo {
            position: absolute;
            left: -90px;
            top: 0;
            background-color: red;
            border-radius: 50%;
        }

        .you {
            position: absolute;
            left: 0;
            top: -90px;
            background-color: red;
            border-radius: 50%;
        }

        .fu:nth-child(2) {
            left: 100px;
            top: -400px;
        }

        .jian {
            width: 1000px;
            height: 0px;
            position: absolute;
            left: 500px;
            top: 300px;
            border-bottom: 2px solid #f00;
            z-index: 2;
            animation: myjian 2s infinite;
        }

        .tou {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            border-top-width: 0px;
            border-left-width: 0px;
            position: absolute;
            right: 0;
            top: -50px;
            transform: rotate(-45deg);
        }

        .shang {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            transform: skewX(30deg);
            position: absolute;
            left: 0;
            top: -103px;
        }

        .xia {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            transform: skewX(-30deg);
            position: absolute;
            left: 0;
            top: 0px;
        }
    </style>
</head>

<body>
    <div class="fu">
        <div class="zuo"></div>
        <div class="you"></div>
    </div>

    <div class="fu">
        <div class="zuo"></div>
        <div class="you"></div>
    </div>
    <div class="jian">
        <div class="tou"></div>
        <div class="shang"></div>
        <div class="xia"></div>
    </div>
</body>

</html>